-
Notifications
You must be signed in to change notification settings - Fork 370
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expose utility for logging video frames for an entire video #7421
Conversation
media type fixup
…er to export functionality of re_video to other languages
…since it's more consistent
Deployed docs
|
crates/store/re_types/definitions/rerun/components/annotation_context.fbs
Outdated
Show resolved
Hide resolved
d8922f9
to
5049e93
Compare
/// Returns whether a buffer is MP4 video data. | ||
/// | ||
/// From `infer` crate. | ||
pub fn is_mp4(buf: &[u8]) -> bool { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lol, not error prone at all 🙈
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🙈
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
happy to take suggestions ;-)
extern "C" fn(context: *mut std::ffi::c_void, num_timestamps: u32) -> *mut i64, | ||
>, | ||
error: *mut CError, | ||
) -> *mut i64 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This bare pointer in the signature seems kind of awkward and hard-to-use without knowledge of the num_timestamps
param that was passed into the alloc_func.
Do we need this for anything / does it make some common pattern more ergonomic?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
needed it orginally but didn't bother to remove it. Let's clean this up!
|
||
#[allow(unsafe_code)] | ||
#[no_mangle] | ||
pub extern "C" fn rr_video_asset_read_frame_timestamps_ns( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
More work than you likely want to tackle today, but once we have "dataframe" APIs in rerun_c, I think this is a good candidate to return the same arrow-based columnar structures we use in our query APIs instead of a bare array like this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agreed on both accounts 😄
crates/viewer/re_context_menu/src/actions/add_entities_to_new_space_view.rs
Outdated
Show resolved
Hide resolved
@rerun-bot full-check |
Started a full build: https://github.com/rerun-io/rerun/actions/runs/10900732294 |
What
Had to patch this through to all 3 sdks which naturally takes quite a bit of extra machinery.
Decided to go with raw ns here since it's easiest to pass through FFI and is the most versatile (hopefully our
VideoFrameReference
typing will be solved with tags instead of per component enums in the future, making this more equivalent).Changed snippets around. There's now:
Asset drag & drop got updated to also use this utility.
All this churn also led me to changing how
re_video
is used a bit, making the entry point more highlevel. Media type got a bit annoying there because we can't affordre_types
dependencies in the C++ & Rust SDKs. The solution here is to have independent media type parsing for videos inre_video
.Checklist
main
build: rerun.io/viewernightly
build: rerun.io/viewerCHANGELOG.md
and the migration guidemain
ciTo run all checks from
main
, comment on the PR with@rerun-bot full-check
.